package com.SouthernWall_404.Age_Capitalism.Client.Render.RenderType;

import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.VertexFormat;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.RenderStateShard;
import net.minecraft.client.renderer.RenderType;

import java.util.OptionalDouble;

public class GlowRenderType extends RenderType {

    public GlowRenderType(String string, VertexFormat vertexFormat, VertexFormat.Mode mode, int i, boolean bl, boolean bl2, Runnable runnable, Runnable runnable2) {
        super(string, vertexFormat, mode, i, bl, bl2, runnable, runnable2);
    }

    public static final RenderType LINES_NORMAL = RenderType.create("age_lines_normal",
            DefaultVertexFormat.POSITION_COLOR,
            VertexFormat.Mode.DEBUG_LINES,
            256,
            false,
            false,
            RenderType.CompositeState.builder()
                    .setShaderState(new ShaderStateShard(GameRenderer::getPositionColorShader))
                    .setLineState(new LineStateShard(OptionalDouble.of(3)))
                    .setLayeringState(NO_LAYERING)
                    .setTransparencyState(TRANSLUCENT_TRANSPARENCY)
                    .setWriteMaskState(COLOR_DEPTH_WRITE)
                    .setCullState(NO_CULL)
                    .setDepthTestState(NO_DEPTH_TEST)
            .createCompositeState(false));
//    public static final RenderType LINES_HOLLOW = create(
//            "glow_lines_hollow",
//            DefaultVertexFormat.POSITION_COLOR,
//            VertexFormat.Mode.LINES,
//            256,
//            false,
//            false,
//            CompositeState.builder()
//                    .setShaderState(new ShaderStateShard(GameRenderer::getPositionColorShader))
//                    .setLineState(new LineStateShard(OptionalDouble.empty()))
//                    .setLayeringState(NO_LAYERING)
//                    .setTransparencyState(TRANSLUCENT_TRANSPARENCY)
//                    .setWriteMaskState(COLOR_DEPTH_WRITE)
//                    .setCullState(CULL)
//                    .setDepthTestState(NO_DEPTH_TEST)
//                    .createCompositeState(false));

}
